import Vue from "vue";
import VueRouter from "vue-router";
import Layout from "@/layout/index.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/login/index.vue"),
    meta: { title: "登录", isHidden: true },
  },
  {
    path: "/",
    component: Layout,
    redirect: "/home",
    meta: { title: "", isHidden: true },
    children: [
      {
        path: "home",
        name: "home",
        component: () => import("@/views/system/home/index.vue"),
        meta: { title: "工作台", isHidden: false },
      },
    ],
  },
];
const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
